home *** CD-ROM | disk | FTP | other *** search
/ Galleria D'arte: Manet / Manet.iso / Dati / Quiz.dxr / 00007_ID risposta.ls < prev    next >
Encoding:
Text File  |  2000-12-21  |  1.5 KB  |  61 lines

  1. property pID
  2.  
  3. on getPropertyDescriptionList
  4.   propertyDescriptionList = [#pID: [#comment: "ID risposta", #range: [1, 2, 3], #format: #integer, #default: 1]]
  5.   return propertyDescriptionList
  6. end
  7.  
  8. on mouseUp me
  9.   global gPunteggio, gNumeroDomanda, gRispostaSbagliata
  10.   dati = line gNumeroDomanda of field "dati"
  11.   good = item 5 of dati
  12.   delete char 1 to 3 of good
  13.   if pID = good then
  14.     nascondisbagliate()
  15.     tmp = the member of sprite the currentSpriteNum
  16.     set the foreColor of field tmp to 11
  17.     suonook(gRispostaSbagliata)
  18.     go(3)
  19.     if gRispostaSbagliata = 0 then
  20.       gPunteggio = gPunteggio + 1
  21.     end if
  22.     domanda()
  23.     startTimer()
  24.     cursor(4)
  25.     repeat with i = 1 to the maxinteger
  26.       if the timer < (60 * 2) then
  27.         nothing()
  28.         next repeat
  29.       end if
  30.       visualizzadomanda()
  31.       exit repeat
  32.     end repeat
  33.     cursor(-1)
  34.   else
  35.     gRispostaSbagliata = gRispostaSbagliata + 1
  36.     sprite(the currentSpriteNum).visible = 0
  37.     suonono()
  38.     if gRispostaSbagliata = 2 then
  39.       repeat with i = 1 to 3
  40.         set the foreColor of field ("risposta" & i) to 11
  41.       end repeat
  42.       go(3)
  43.       domanda()
  44.       startTimer()
  45.       cursor(4)
  46.       repeat with i = 1 to the maxinteger
  47.         if the timer < (60 * 2) then
  48.           nothing()
  49.           next repeat
  50.         end if
  51.         repeat with p = 1 to 3
  52.           set the foreColor of field ("risposta" & p) to 0
  53.         end repeat
  54.         visualizzadomanda()
  55.         exit repeat
  56.       end repeat
  57.       cursor(-1)
  58.     end if
  59.   end if
  60. end
  61.